package avl;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:咭咭熊
 * Date:2021 - 08 - 26
 * Time:9:53
 */
public class Shuffle {
    public static void main(String[] args) {
        List<Integer> list  = new ArrayList<>();
        for (int i = 0; i <= 20 ; i++) {
            list.add(i);
        }

        //固定的种子，保证随机结果不变
        Random random = new Random(20210814);
        Collections.shuffle(list);
        System.out.println(list);
    }
}
